package mybatis.mate.sensitivewords.controller;

import mybatis.mate.sensitivewords.config.ParamsConfig;
import mybatis.mate.sensitivewords.entity.Article;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 演示文章敏感词过滤
 */
@RestController
public class ArticleController {

    // 测试访问下面地址观察控制台（ 请求json参数 ）
    @PostMapping("/json")
    public String json(@RequestBody Article article) throws Exception {
        return ParamsConfig.toJson(article);
    }

}